<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <meta name="description" content="<?php echo ($site_conf["setting_site_title"]); ?>">
    <meta name="author" content="CDCT TEAM.">
    <title>系统后台－角色列表</title>
    
    <link type="text/css" rel="stylesheet" href="/static/common/style/reset.css" />
    <link type="text/css" rel="stylesheet" href="/static/admin/style/basic.css"/>
    <style type="text/css">html,body{height:100%;}html{height:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}</style>
    
    <link rel="stylesheet" href="/static/layui/css/layui.css" type="text/css">

</head>
<body>


    <div class="wrap-page">
        <div id="pageBookList" class="page-content">
            <Admintemplate file="Common/SubTabs"/>
            <div id="boxBookList" class="box">
                <div class="box-content">
                    <div class="wrap-table">
                        <div class="table-bar table-bar-head clearfix">
                            <div class="fl-l">
                                <div class="tools">
                                    <span class="tool-item"><a class="button button-blue" href="<?php echo U('backend/admin_role/add');?>">新角色</a></span>
                                </div>
                            </div>
                            <div class="fl-r">
                                <div class="tools">
                                    <span class="tool-item"><button onclick="javascript:window.location.replace(window.location.href);" class="button button-default" type="button">刷新列表</button></span>
                                </div>
                            </div>
                        </div>
                            <table class="table default-style" cellpadding="0" cellspacing="0" width="100%">
                                <thead>
                                <tr>
                                    <th width="40"><div class="th-inner"><input type="checkbox" name="checkall" class="J_checkall"></div></th>
                                    <th width="40"><div class="th-inner">ID</div></th>
                                    <th><div class="th-inner al-c"><?php echo L('admininrole');?></div></th>
                                    <th><div class="th-inner al-c"><?php echo L('addtime');?></div></th>
                                    <th><div class="th-inner al-c"><?php echo L('status');?></div></th>
                                    <th width=100><div class="th-inner al-c"><?php echo L('operations_manage');?></div></th>
                                </tr>
                                </thead>
                                <tbody>
                                <?php if(empty($list)): ?><tr class="empty"><td colspan="20"><div class="data-empty">暂无数据</div></td></tr><?php endif; ?>
                                <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($i % 2 );++$i;?><tr>
                                        <td align="center"><input type="checkbox" class="J_checkitem" value="<?php echo ($val["id"]); ?>"></td>
                                        <td align="left"><?php echo ($val["id"]); ?></td>
                                        <td align="left"><span data-tdtype="edit" data-field="name" class="tdedit" data-id="<?php echo ($val["id"]); ?>"><?php echo ($val["name"]); ?></span></td>
                                        <td align="left"><?php echo (date('Y-m-d H:i:s',$val["addtime"])); ?></td>
                                        <td align="left">
                                            <?php if($val["status"] == 1): ?><font style="color: #006600">启用</font><?php endif; ?>
                                            <?php if($val["status"] == 0): ?><font style="color: red">停用</font><?php endif; ?>
                                        </td>
                                        <td align="left" width="130">
                                            <a href="<?php echo U('backend/admin_role/edit', array('id'=>$val['id']));?>"><i class="layui-icon layui-icon-edit">&#xe642;</i><?php echo L('edit');?></a> ｜
                                            <a href="<?php echo U('backend/admin_role/authorize', array('id'=>$val['id']));?>"><i class="layui-icon layui-icon-edit">&#xe612;</i><?php echo L('authorize');?></a>
                                        </td>
                                    </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                                </tbody>
                            </table>
                        <?php if(!empty($page)): ?><div class="table-bar table-bar-foot clearfix page-container">
                                <div class="fl-r">
                                    <div class="tools">
                                    <span class="tool-item tool-text">
                                        <span class="pagging"><?php echo ($page); ?></span>
                                        <span></span>
                                    </span>
                                    </div>
                                </div>
                            </div><?php endif; ?>
                    </div>
                </div>
            </div>
        </div>
    </div>

<script type="text/javascript" src="/static/common/script/jquery-1.11.1.min.js"></script>
<script src="/static/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript" src="/static/admin/script/common.js"></script>
<script type="text/javascript" src="/static/admin/script/listTable.js"></script>

</body>
</html>